Skip to content

feat: Added React Demo webApp and deployment workflow#73

Open
rockyRaccoon13 wants to merge 221 commits intoni:mainfrom
Samuelsotogit:devOps/CI_CD
Open

feat: Added React Demo webApp and deployment workflow#73
rockyRaccoon13 wants to merge 221 commits intoni:mainfrom
Samuelsotogit:devOps/CI_CD

Conversation

@rockyRaccoon13
Copy link
Collaborator

@rockyRaccoon13 rockyRaccoon13 commented Feb 12, 2026

Justification

Added a React demo web application using Vite to demonstrate how a customer might create a webApp and deploy it to SystemLink. The webApp demos how to call SystemLink APIs both in development (locally) and in production (within a SystemLink website).

The github actions webApp workflow automates building, linting, and deployment to the SystemLink website. The workflow also outputs a .nipkg artifact of the webApp to github. See /.github/workflows/webapp_deploy.yml

Implementation

  • Webapp Design

    • The web app was created in TypeScript/React with nimble design components
    • see examples/web_apps/Framework_Examples/React/ApiKeyAuthApp
  • Running in Development (locally) vs Production (hosted in SystemLink website)

    • Environment (.env.development and .env.production) files allow variable domain for fetches (dev will fetch from the local proxy server, prod will fetch from the hosting website)
  • ApiServiceProxy -- Required to run web app locally

    • To run in development, developers must call a SystemLink API URL with an API key
    • A proxy is required in order to circumvent browser CORS issues
    • The proxy also allows for API authentication in development and session
      token authentication when the web app is hosted in the SystemLink website
    • Setup instructions for the proxy are included in ApiServiceProxy/README.md
  • Production -- Running inside SystemLink Website

    • In production, the webApp will call the same APIs but from the hosting SystemLink website domain (instead of an API URL)
    • Instructions for deploying the webApp to production are included in the ApiKeyAuthApp/README.md
    • For developers, the deployment steps are also automated in ./deployDev.sh
  • Workflow -- Building, Linting, Deployment to SystemLink website

    • Most of the workflow relies on npm scripts defined in a webApp's package.json (npm ci, npm lint, npm build).
      • This will work for any node.js project, but will need to change for future wasm apps such as blazor
        • Change will likely be using shell scripts instead of package manager scripts
    • Each webApp folder must be added to the job matrix to be included in the script
  • SystemLink CLI (SL CLI) integration in Workflow

    • The SL CLI was installed into the workflow by using brew (brew was provided on the github-runner, but needed to be added to the env path)
    • The SL CLI allows for:
      • Packaging a webApp into an .nipkg file
      • Deploying to a user's workspace
    • Github Secrets
      • The workflow includes secrets which will allow any developer to copy the workflow and use it for CI/CD
      • Required secrets for the workflow:
        • SL_API_URL
        • SL_API_KEY
        • SL_WEBSITE_URL
        • SL_WORKSPACE

Testing

  • Local env

    • The webApp was run locally on a few devices using the proxy server and successfully called the API.
  • Within SystemLink website

    • The webApp was also successfully deployed to SystemLink website, where it was able to call the API for the logged in user.
  • Workflow

    • The workflow was tested a couple of times on pushes to our fork's devOps branch. The workflow successfully built, packaged, and deployed the web application!

Checklist

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Separated Blazor and Node build jobs

I have separated the node apps and blazor apps into separate build jobs in the same workflow.

After reviewing @Samuelsotogit 's deploy script, I refactored the Blazor build steps.

Successfully deploys web apps

The script successfully deployed React,Angular, and Blazor apps (see the SL test env webapps suffixed with _PROD in the BYU2026 workspace).

Analysis

Blazor build steps is by far the slowest part of the workflow -- taking about 1 min.

I could create separate workflow files for Blazor and Node apps if needed, but I don't want to add more files to the workflow folders without approval.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we either remove the Blazor script from this PR for now or comment it out? Right now it's failing the PR checks because there isn't anything for it to build: the PR only contains the React app and API proxy.

Longer term I'm not too worried about build duration while we're still only taking a minute or two. But I am keeping an eye on the complexity and number of workflows (see my comment in the other thread about potential future refactors there).

Copy link
Collaborator

@jattasNI jattasNI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are getting close. I scanned all the comments and I think the only remaining open ones are:

  1. @rockyRaccoon13 Blazor pipeline is failing
  2. @amur-bashirov font issues
  3. not sure who: README suggestions

@@ -64,6 +64,18 @@ and extend SystemLink Enterprise for your organization's needs.
- Create work item templates for standardization
- Define custom workflows with specialized states and actions
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copying a comment from my original review that got overlooked because GitHub buried it:

I think it'd be useful to add small READMEs at a few levels in the hierarchy:

  • in the React directory, a README that links to info about React and lists the apps along with a 1 sentence description of each one
  • in the Framework Examples directory, a README that explains how the web apps are organized and that talks a little bit about what they are demonstrating (similar to the info you added in the root README)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants